package com.tfswue.lh.listener;

import jakarta.servlet.http.HttpSessionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MySessionListener implements HttpSessionListener {
    private static final Logger logger =
            LoggerFactory.getLogger(MySessionListener.class);


    @Override
    public void sessionCreated(jakarta.servlet.http.HttpSessionEvent se) {
        logger.info("会话已创建，Session ID:{}", se.getSession().getId());
    }

    @Override
    public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent se) {
        logger.info("会话已销毁，Session ID: {}", se.getSession().getId());
    }
}
